import Mock from 'mockjs'

import tableAPI from './user'

// 用户相关
Mock.mock(/\/user\/getUser/, 'get', tableAPI.getUserList)
Mock.mock(/\/user\/remove/, 'get', tableAPI.deleteUser)
Mock.mock(/\/user\/batchremove/, 'get', tableAPI.batchremove)
Mock.mock(/\/user\/add/, 'get', tableAPI.createUser)
Mock.mock(/\/user\/edit/, 'get', tableAPI.updateUser)

// // import Mock from 'mockjs'//ES6写法
// let Mock = require("mockjs") 
// //模拟延迟
// Mock.setup({
//     timeout:500
// })

// const { list } = Mock.mock({
//     list:[
//         {
//             "id":"@increment()",
//             "title":"@ctitle()",
//             "contnet":"@cparagraph()",
//             "img_url":"@image('100*100','#ff83fa','#fcfcfc','png','reaper')",
//             "id":"@date(yyyy-MM-dd hh:mm:ss)",
//         }
//     ]
// })

// Mock.mock('/api/get/list','get',()=>{
//     return {
//         status:200,
//         message:'请求成功',
//         list:list,
//         total:list.length
//     }
// })